#include "BallSketcher.h"
#include "SketcherHelper.h"

BallSketcher::BallSketcher(Ball * ball) {
	this->ball = ball;
}

void BallSketcher::draw() {
	Color * ballLineColor = this->ball->getLineColor();
	Color * ballBackgroundColor = this->ball->getElementColor();
	//Texture * ballTexture = this->ball->getTexture();
	Texture * ballTexture = NULL;
	Position * ballPosition = this->ball->getPosition();
	float ballRadius = this->ball->getRadius();

	if(ballTexture != NULL) {
		SketcherHelper::getInstance()->drawCircle(ballPosition,ballRadius,ballTexture,ballLineColor);
	}else {
		SketcherHelper::getInstance()->drawCircle(ballPosition,ballRadius,ballBackgroundColor,ballLineColor);
	}
}

BallSketcher::~BallSketcher() {
	delete this->ball;
}
